#include "loginwin.h"
#include "mainwindow.h"
#include "ui_loginwin.h"

LoginWin::LoginWin(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::LoginWin)
{
    ui->setupUi(this);
}

LoginWin::~LoginWin()
{
    delete ui;
}

void LoginWin::on_loginBt_clicked()
{
    //获取用户名和密码
    QString user = ui->userEdit->text();
    QString pass = ui->passEdit->text();

    if(user=="刘嘉伟大坏蛋" && pass == "没错你说的对"){
        //创建一个主界面
        MainWindow *win = new MainWindow();
        win->setUserInfo(user,pass);
        win->show();
        this->close();
    }


}
